package com.geper.pattern.Prototype;

/**
 * @author: lsy
 * @date: 2020-03-01 13:51
 * @description: UserPrototypeTest
 */
public class UserPrototypeTest {

    public static void main(String[] args) {
        User user = new User();
        user.setAge(11);
        user.setName("张三");

        User clone = user.deepClone();
        clone.setSex("男");

        System.out.println("原对象"+ user);
        System.out.println("克隆对象" + clone);
        System.out.println(user == clone);




    }
}
